package lg.minecraft.plugin.pokemonmenu.event;

import com.cobblemon.mod.common.pokemon.Pokemon;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;

/**
 * @author langle__
 * @version 1.0
 */
public class EventFactory {

    /**
     * 触发物品转宝可梦事件
     *
     * @param player 玩家对象
     * @param pokemon 宝可梦对象
     * @return 事件对象
     */
    public static ItemToPokemonEvent callItemToPokemonEvent(Player player, Pokemon pokemon) {
        ItemToPokemonEvent event = new ItemToPokemonEvent(player, pokemon);
        Bukkit.getPluginManager().callEvent(event);
        return event;
    }

    public static PokemonToItemEvent callPokemonToItemEventEvent(Player player, Pokemon pokemon) {
        PokemonToItemEvent event = new PokemonToItemEvent(player, pokemon);
        Bukkit.getPluginManager().callEvent(event);
        return event;
    }

}
